angular.module('app.services', ['ui.hide-tabs'])


.factory('Sliders', function () {

    var sliders = [{
        link: '#/user/center',
        imgUrl: 'img/slides/s1.jpg'
    }, {
        link: '#/user/center',
        imgUrl: 'img/slides/s2.jpg'
    }, {
        link: '#/user/center',
        imgUrl: 'img/slides/s3.jpg'
    }, {
        link: '#/user/center',
        imgUrl: 'img/slides/s4.jpg'
    }];

    return sliders
})

.service('BlankService', [function(){

}]);



/*=============指令module==============*/

angular.module('ui.hide-tabs', [])
    .directive('hideTabs', function ($rootScope) {
        return {
            restrict: 'A',
            link: function(scope, element, attributes) {
                scope.$watch(attributes.hideTabs, function(value){
                    $rootScope.hideTabs = value;
                });

                scope.$on('$destroy', function() {
                    $rootScope.hideTabs = false;
                });
            }
        }
    });
